package com.mkh.st.admin.feign;

import com.mkh.st.admin.api.dto.SysLogDTO;
import com.mkh.st.admin.api.feign.ISysLogProvider;
import com.mkh.st.admin.service.SysLogService;
import com.mkh.st.common.core.util.R;
import com.mkh.st.common.security.annotation.Inner;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class SysLogProvider implements ISysLogProvider {

	private final SysLogService sysLogService;

	@Override
	@Inner(value = false)
	@PostMapping("/log/provider/saveLog")
	public R<Boolean> saveLog(@RequestBody SysLogDTO sysLog) {
		return R.ok(sysLogService.saveLog(sysLog));
	}
}
